<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link type="text/css" href="/topjui/css/myui.css" rel="stylesheet"/>
</head>
<body>
<form id="customerform" method="post" style="padding-top:1px">
<input type="hidden" id="id" name="id" value="0">
<table class="editTable">
    <tr>
        <td class="label">车队名称</td>
        <td>
            <input type="text" name="name"  class="inputp" autocomplete="off" data-options="required:true" style="width: 211px;">
        </td>
    </tr>
    <tr>
        <td class="label">所属单位</td>
        <td>
            <input type="hidden" class="easyui-validatebox" data-options="required:true" id="form-parentid" name="departid" value="0" >
            <input type="hidden" class="easyui-validatebox" data-options="required:true" id="form-departname" name="departname" value="" >
            <input class="selectp"  type="text" name="depart" id="form-parentname">
        </td>
    </tr>
    <tr>
        <td class="label">车队负责人</td>
        <td>
            <input type="text" name="leader"  class="inputp" autocomplete="off" data-options="required:false" style="width: 211px;">
        </td>
    </tr>
    <tr>
        <td class="label">联系电话</td>
        <td>
            <input type="text" name="contact"  class="inputp" autocomplete="off" data-options="required:false" style="width: 211px;">
        </td>
    </tr>
    <tr>
        <td class="label">状态</td>
        <td>
            <select name="status" style="width: 240px;" class="selectp">
                <option value="1">正常</option>
                <option value='0'>禁用</option>
            </select>
        </td>
    </tr>
</table>
<script th:inline="javascript">
    $(function () {
        $('#form-parentname').combotree({
            width: 212,
            height: 32,
            style: "width:212px;height:32px;",
            cls: 'selectp',
            panelWidth: 212,
            hasDownArrow: true,
            url: '/depart/tree',
            required: true,
            onSelect: function (data) {
                $("#form-parentid").val(data.id);
                $("#form-departname").val(data.text);
                $("#form-parentname").val(data.text);
            }
        });
        $(".combo-text").removeAttr("style");
        $(".combo-text").attr("style", "width:212px;height:32px;line-height:32px");
        $(".combo-text").addClass("selectp");
        $(".combo-arrow").attr("style", "margin-left: -20px;margin-top: 8px;background-color:rgba(0,0,0,0)");
        $(".combo-panel").attr("style", "margin-top:10px;");

    })

</script>
</form>
</body>
</html>